<?php
$sql = 'SELECT * FROM '.Tbladvertise::tbladvertise.'  WHERE  '.Tbladvertise::status.' = 1  AND  '.Tbladvertise::page.' = 0  AND ' .Tbladvertise::position. ' = "right" ORDER BY '.Tbladvertise::date_modified.' DESC LIMIT 3';
$result = mysql_query($sql);
$i = 1;
$border = "";
if(mysql_num_rows($result)>0){
	 while ($row = mysql_fetch_object($result)) {?>
			<div class="image">
				<a href="<?php echo $row->{Tbladvertise::link} ?>" target="_blank">
					<img class="image_product_tap" src="<?php echo 'images/advertise/' . $row->{Tbladvertise::image} . '"'; ?>" width="100%" />
				</a>
			</div>
			<div class="clear"></div>
	<?php
	}
 }else{
	echo '<img class="image_product_tap" src="images/advertise/default_advertise.png" />';	 
}
